<template>
  <div>
    <p>iframe测试</p>
    <button @click="openIframe">iframe测试</button>
    <button @click="goProd">{{proUrl}}</button>
    <cj-popup v-model="isShow" position="bottom" round @open="open">
      <iframe :src="iframeUrl" class="iframe"></iframe>
    </cj-popup>
  </div>
</template>
<script>
export default {
  name: "PageTest1",
  data() {
    return {
      isShow: false,
      proUrl:"",
      iframeUrl:""
    }
  },
  mounted() {

  },
  methods:{
    openIframe() {
      this.isShow = true;
    },
    goProd() {
      window.location.href = this.proUrl;
    },
    open() {
      this.proUrl = decodeURIComponent(this.$route.query.iframeUrl);
      let iframeUrl = this.proUrl + "&openFromBy=1";
      console.log("iframe")
      this.iframeUrl = iframeUrl;
    }
  }
}
</script>
<style scoped lang="scss">
.iframe {
  width: 100%;
  height: 500px;
}
</style>